package com.hd.until;

import java.util.Date;
import java.util.Random;

public class CommonToolUtil {
	
	
	/*
	 * 生成18位身份证号码
	 */
	public static String getCertId(){		
		return "43062"+String.valueOf(new Date().getTime());
	}	
	
	/*
	 * 生成189开头 11位手机号码
	 * 
	 */
	
	public static String getPhoneNo(){
		Random random = new Random();
		int rannum = (int) (random.nextDouble() * (99999999 - 10000000 + 1)) + 10000000;
		return "189" + String.valueOf(rannum);
	}
	
	
	/*
	 * 生成30,0000以内 1000的整数倍随机数
	 */
	
	public static String getLoanAmt(){
		Random random = new Random();

		return String.valueOf(random.nextInt(30) + 1)+"000";
	}
	
	
	/*
	 * 生成16位 随机招商银行卡号
	 */
	public static String getCMBCardNo(){
		return BankCardTest.getBrankNumber("6");
	}
	
	public static void main(String[] args) {
		System.out.println(getPhoneNo());
		System.err.println(getCertId());
		
		System.out.println(getLoanAmt());
		System.out.println(getCMBCardNo());
	}

}
